package action;

import com.opensymphony.xwork2.ActionSupport;
import com.opensymphony.xwork2.ModelDriven;
import pojo.TbUser;
import service.UserService;

public class register extends ActionSupport implements ModelDriven {

    private TbUser      tbUser = new TbUser();
    private UserService userService ;

    @Override
    public TbUser getModel() {
        return tbUser;
    }

    public TbUser getTbUser() {
        return tbUser;
    }

    public void setTbUser(TbUser tbUser) {
        this.tbUser = tbUser;
    }
    public void setUserService(UserService userService) {
        this.userService = userService;
    }

    public String userRegister()
    {
        boolean isTrue = userService.register(tbUser);
        if(isTrue)
            return "success";
        else
            return "false";
    }

}
